module.exports = {
    publicPath: process.env.NODE_ENV === 'production'
        ? '/'
        : '/',

    chainWebpack: config => {
        config.plugin('html').tap(args => {
            args[0].base = process.env.NODE_ENV === 'production'
                ? '/'
                : '/';
            return args;
        });
    },
    devServer: {
        proxy: {
            '/api': {
                target: 'http://localhost:8080/',
                // target: 'http://192.168.3.188:8080/',
                changeOrigin: true,
                pathRewrite: {
                    '^/api': ''
                }
            }
        }
    }
}